import { Column, Entity, PrimaryColumn, PrimaryGeneratedColumn } from "typeorm";

@Entity({
    name: 'ws_room'
})
export class WsRoom {
    @PrimaryColumn()
    room_id: string;

    @Column()
    from: string;
}
@Entity({
    name: 'ws_room_socke'
})
export class WsRoomSocket {
    @PrimaryGeneratedColumn()
    id: number;

    @Column()
    room_id: string;

    @Column()
    socket_id: string;

    @Column({ nullable: true })
    client_id: string;
}


@Entity({
    name: 'ws_socket'
})
export class WsSocket {
    @PrimaryGeneratedColumn()
    id: string;

    @Column()
    client_id: string

    @Column()
    socket_id: string;

    @Column({ nullable: true })
    uid: string;

    @Column({ default: 'main' })
    from: string;
}